Skip to content

Test: add more aggregation focused dictionary sql logic test#23280

Merged
kosiew merged 1 commit into
apache:mainfrom
Rich-T-kid:rich-T-kid/Dictionary-datatype-test
Jul 11, 2026
Merged

Test: add more aggregation focused dictionary sql logic test#23280
kosiew merged 1 commit into
apache:mainfrom
Rich-T-kid:rich-T-kid/Dictionary-datatype-test

Conversation

@Rich-T-kid

@Rich-T-kid Rich-T-kid commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

works towards #22682.

Rationale for this change

There is a lack of testing for multi-dictionary group bys. It make sense to introduce these test before the implementation of Dict<K,V> in #23187

What changes are included in this PR?

introduces a couple test

  • grouping by Dict<_,largeutf8>
  • mixing grouping by dictionarys and non dictionary columns
  • a 3-way group by where each column is dict<_,_>
  • the test also have nulls sprinkled in to verify null handling

Are these changes tested?

the changes are test.

Are there any user-facing changes?

no

@Rich-T-kid

Copy link
Copy Markdown
Contributor Author

@Jefffrey could you take a look

@kosiew kosiew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rich-T-kid
Thanks! I took a look and this LGTM overall.

I just have one small suggestion that could make the test coverage a bit more robust.

# multiple dictionary columns as group keys

statement ok
CREATE TABLE dict_multi_key AS

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition. This expands the GROUP BY coverage for multiple dictionary columns well.

One thought for a future follow-up: all of the rows here come from a single VALUES-derived table, so this is mostly exercising one dictionary encoding per column. It could be useful to add a case where the same logical values arrive in different batches or inputs with different dictionary key assignments. That would help catch implementations that accidentally group by dictionary keys instead of decoded values.

Not blocking though. The current tests already cover multiple dictionary key columns, mixed key widths, nulls, and aggregates.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the review @kosiew , I agree I think this would be a nice addition. Id be happy to make a follow up PR to add this.

@kosiew kosiew added this pull request to the merge queue Jul 11, 2026
Merged via the queue into apache:main with commit 95398f0 Jul 11, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants